package com.luzh.myspring.bean.model;

import com.luzh.myspring.beans.BeanException;
import com.luzh.myspring.beans.factory.FactoryBean;
import com.luzh.myspring.beans.factory.annotation.Value;

//@Component("bookFactory")
public class BookBeanFactory implements FactoryBean<Book> {
    @Value("水浒传${book.version}")
    private String name;

    @Override
    public Book getObject() throws BeanException {
        return new Book();
    }

    @Override
    public Class<?> getObjectType() {
        return Book.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
